<?php

use Illuminate\Routing\Router;

Admin::registerAuthRoutes();

Route::group([
    'prefix'        => config('admin.route.prefix'),
    'namespace'     => config('admin.route.namespace'),
//    'middleware'    => config('admin.route.middleware'),
], function (Router $router) {
    //定时任务执行,获取审核后的ixigua地址
    $router->get('/cron/getArticleSourceToday', 'CrontabController@getArticleSourceToday');
});

Route::group([
    'prefix'        => config('admin.route.prefix'),
    'namespace'     => config('admin.route.namespace'),
    'middleware'    => config('admin.route.middleware'),
], function (Router $router) {
    $router->get('/', 'HomeController@index');
    //用户收益日分类
    $router->get('/home/memberDay', 'HomeController@memberDay');

    $router->post('/category/opreat', 'CategoryController@opreat');
    //分类列表
    $router->resource('/category', 'CategoryController');
    //产品视频
    $router->post('/article/checkPost', 'ArticleController@checkPost');
    $router->get('/article/video', 'ArticleController@video');
    $router->resource('/article', 'ArticleController');

    //用户列表
    $router->resource('/member', 'MemberController');

    $router->get('/taskconfig/opreat', 'TaskConfigController@opreat');
    $router->post('/taskconfig/opreatSave', 'TaskConfigController@opreatSave');
    //转发规则
    $router->resource('/taskconfig', 'TaskConfigController');

    $router->post('/taskTest/opreat', 'TaskTestController@opreat');
    //试玩金币任务
    $router->resource('/taskTest', 'TaskTestController');
    //资金明细
    $router->resource('/capitalLog', 'CapitalController');
    //提现管理
    $router->get('/tiCash/bi', 'TiCashController@bi');  //-金币提现
    $router->get('/tiCash/cash', 'TiCashController@cash'); //零钱提现
    $router->get('/tiCash/bi/{id}/edit', 'TiCashController@edit');
    $router->put('/tiCash/bi/{id}', 'TiCashController@update');
    $router->get('/tiCash/cash/{id}/edit', 'TiCashController@edit');
    $router->put('/tiCash/cash/{id}', 'TiCashController@update');
    //活动管理
    $router->resource('/activity', 'ActivityController');
    //敏感词
    $router->post('/blackwordPost', 'BasicController@blackWordSave');
    $router->get('/blackword', 'BasicController@blackWord');
    //参数设置
    $router->resource('/basic', 'BasicController');
    //新用户走势
    $router->get('/newUsers', 'NewUsersTrendController@newUsers');
    //活跃用户走势
    $router->get('/activeUsers', 'NewUsersTrendController@activeUsers');
    //邀请排行榜
    $router->get('/inviteRank', 'NewUsersTrendController@inviteRank');
    //徒弟详情
    $router->get('/inviteRank/opreat', 'NewUsersTrendController@opreat');
    //提现申请
    $router->get('/tiCashLog', 'NewUsersTrendController@tiCashLog');
    //评论列表
    $router->resource('/commentList', 'CommentController');
    //评论操作
    $router->post('/comment/opreat', 'CommentController@opreat');
    $router->post('/commentList/checkPost', 'CommentController@checkPost');
});
